package com.practice.rmi.server;

import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

public class Server {
	
	public static void main(String[] args) {
		try {
			IHelloService hello = new HelloServiceImpl();
			
			LocateRegistry.createRegistry(8888);
			
			Naming.rebind("rmi://127.0.0.1:8888/Hello", hello);
			System.out.println("服务启动成功");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
